<style>
    body{
        background: #eee;
        font-family: 'Microsoft Yahei';
    }
    #main{
        width: 500px;
        margin: 100px auto;
        background: #fff;
        min-height: 16em;
        border-radius: 10px;
        box-shadow: 0px 2px 8px #bcbcbc;
    }
    .logo{
        text-align: left;
        color: #333;
        font-size: 20px;
        padding: 15px 30px;
        border-bottom: 1px solid #ddd;
    }
    .form{
        margin: 10px auto;
        padding-bottom: 30px;
    }
    .form .form-title{
        font-size: 14px;
        color: #666;
        text-align: center;
        padding: 10px;
        margin: 0;
    }
    .form .control-group{
        padding: 10px 0;
        margin-left: 100px;
    }
    .form input{
        border: 1px solid #ddd;
        border-radius: 5px;
        height: 40px;
        line-height: 40px;
        padding-left: 5px;
        width: 240px;
        background: #fff;
    }
    .form .control-group label{
        color: #777;
        width: 50px;
        display: inline-block;
    }
    .button{
        padding: 0;
        border: 1px solid #ddd;
        background-color: #2185d0;
        width: 120px;
        height: 40px;
        border-radius: 5px;
        font-size: 16px;
        color: #fff;
    }
    .button.button-disabled{
        background-color: #ccc;
    }
    .form-tip{
        text-align: left;
        font-size: 13px;
        color: red;
        margin-left: 155px;
    }
</style>

<div id="layout">
    <section id="main" >
        <div class="logo">门户后台配置系统</div>
        <form class="form" method="post"  action="/admin/login">
            <p class="form-title">请用账户密码登录</p>
            <div class="control-group">
                <label for="username">邮箱：</label>
                <input id="username" name="email" type="text" placeholder="邮箱" value="ok8008@yeah.net">
            </div>

            <div class="control-group">
                <label for="password">密码：</label>
                <input id="password" name="password" type="password" placeholder="密码" value="">
            </div>
            <div class="form-tip">
                {{error}}
            </div>
            <div class="control-group">
                <label></label>
                <button type="submit" class="button" id="loginBtn">登录</button>
            </div>
        </form>
    </section>
</div>

<script type="text/javascript">
(function(){
    document.getElementById('loginBtn').onclick = function(e){
        e.preventDefault();
        var tar = e.target || e.srcElement;
        tar.setAttribute('disabled','disabled');
        tar.innerText = '登录中...';
        tar.setAttribute('class', 'button button-disabled');
        document.forms[0].submit();
    }
})();
</script>